///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 30 2011)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif //WX_PRECOMP

#include "GUIFrame.h"

///////////////////////////////////////////////////////////////////////////

GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	mbar = new wxMenuBar( 0 );
	fileMenu = new wxMenu();
	wxMenuItem* menuFileSetDB;
	menuFileSetDB = new wxMenuItem( fileMenu, idMenuSetDB, wxString( wxT("数据库设置(&S)...") ) , wxT("设置数据库表"), wxITEM_NORMAL );
	fileMenu->Append( menuFileSetDB );
	
	wxMenuItem* menuFileLogin;
	menuFileLogin = new wxMenuItem( fileMenu, idMenuLogin, wxString( wxT("用户登录(&L)...") ) , wxT("用户登录"), wxITEM_NORMAL );
	fileMenu->Append( menuFileLogin );
	
	wxMenuItem* m_separator1;
	m_separator1 = fileMenu->AppendSeparator();
	
	wxMenuItem* menuFileExport;
	menuFileExport = new wxMenuItem( fileMenu, idMenuExportTable, wxString( wxT("导出表格(&E)...") ) + wxT('\t') + wxT("Ctrl+E"), wxT("导出到电子表格"), wxITEM_NORMAL );
	fileMenu->Append( menuFileExport );
	
	wxMenuItem* menuFileImport;
	menuFileImport = new wxMenuItem( fileMenu, idMenuImportRouter, wxString( wxT("导入路由器规则(&I)...") ) + wxT('\t') + wxT("Ctrl+I"), wxT("设置并导入路由器规则"), wxITEM_NORMAL );
	fileMenu->Append( menuFileImport );
	
	wxMenuItem* m_separator2;
	m_separator2 = fileMenu->AppendSeparator();
	
	wxMenuItem* menuFileQuit;
	menuFileQuit = new wxMenuItem( fileMenu, idMenuQuit, wxString( wxT("退出(&Q)") ) + wxT('\t') + wxT("Alt+F4"), wxT("退出软件"), wxITEM_NORMAL );
	fileMenu->Append( menuFileQuit );
	
	mbar->Append( fileMenu, wxT("文件(&F)") ); 
	
	editMenu = new wxMenu();
	wxMenuItem* menuEditRebuild;
	menuEditRebuild = new wxMenuItem( editMenu, idMenuRebuild, wxString( wxT("重新汇总(&R)...") ) + wxT('\t') + wxT("Ctrl+R"), wxT("重新汇总数据"), wxITEM_NORMAL );
	editMenu->Append( menuEditRebuild );
	
	wxMenuItem* m_separator3;
	m_separator3 = editMenu->AppendSeparator();
	
	mbar->Append( editMenu, wxT("编辑(&E)") ); 
	
	fileHelp = new wxMenu();
	wxMenuItem* menuHelpAbou;
	menuHelpAbou = new wxMenuItem( fileHelp, idMenuAbout, wxString( wxT("关于(&A)...") ) + wxT('\t') + wxT("F1"), wxT("关于本程序"), wxITEM_NORMAL );
	fileHelp->Append( menuHelpAbou );
	
	mbar->Append( fileHelp, wxT("帮助(&H)") ); 
	
	this->SetMenuBar( mbar );
	
	statusBar = this->CreateStatusBar( 2, wxST_SIZEGRIP, wxID_ANY );
	
	// Connect Events
	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) );
	this->Connect( menuFileLogin->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnLogin ) );
	this->Connect( menuFileExport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnExport ) );
	this->Connect( menuFileQuit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) );
	this->Connect( menuEditRebuild->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnRebuild ) );
	this->Connect( menuHelpAbou->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
}

GUIFrame::~GUIFrame()
{
	// Disconnect Events
	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GUIFrame::OnClose ) );
	this->Disconnect( idMenuLogin, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnLogin ) );
	this->Disconnect( idMenuExportTable, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnExport ) );
	this->Disconnect( idMenuQuit, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnQuit ) );
	this->Disconnect( idMenuRebuild, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnRebuild ) );
	this->Disconnect( idMenuAbout, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GUIFrame::OnAbout ) );
	
}
